<template>
  <div class="wrapper" ref="wrapper">
    <div class="content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import BScroll from "better-scroll"

export default {
  data() {
    return {
      s: null,
    }
  },
  mounted() {
    this.scroll()
  },
  updated() {
    this.s.refresh()
  },
  methods: {
    scroll() {
      let wrapper = this.$refs.wrapper
      this.s = new BScroll(wrapper, {
        mouseWheel: true,
      })
    },
  },
}
</script>

<style scoped>
.wrapper {
  height: 650px;
  overflow: hidden;
}
</style>
